#ifndef _HCC_ERROR_CODE_DRV_PER_HSM_H_
#define _HCC_ERROR_CODE_DRV_PER_HSM_H_

#include "ofc_types.h"
#include "hcc_error_code.h"
#include "hcc_error_code_drv.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_DRV_PER_HSM_ERROR(error_code) (int)HCC_MAKE_DRIVER_ERROR(kHccDrvPerHsm, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_DRV_PER_HSM_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_DRIVER_ERROR(kHccDrvPerHsm, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * 外设Hsm驱动:外设Hsm驱动
 */
enum THccDrvPerHsmTag
{
	kHccDrvPerHsmSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccDrvPerHsmFail	=	HCC_MAKE_DRV_PER_HSM_ERROR(0),			///<失败
	kHccDrvPerHsmComm	=	HCC_MAKE_DRV_PER_HSM_ERROR(1),			///<通讯错误
	kHccDrvPerHsmParam	=	HCC_MAKE_DRV_PER_HSM_ERROR(2),			///<参数错误
	kHccDrvPerHsmCallBack	=	HCC_MAKE_DRV_PER_HSM_ERROR(3),			///<回调函数未设置
	kHccDrvPerHsmExist	=	HCC_MAKE_DRV_PER_HSM_ERROR(4),			///<芯片不存在
	kHccDrvPerHsmOpened	=	HCC_MAKE_DRV_PER_HSM_ERROR(5),			///<设备已打开
	kHccDrvPerHsmClosed	=	HCC_MAKE_DRV_PER_HSM_ERROR(6),			///<设备已关闭
	kHccDrvPerHsmKey	=	HCC_MAKE_DRV_PER_HSM_ERROR(7),			///<密钥导致的失败
	kHccDrvPerHsmBuffer	=	HCC_MAKE_DRV_PER_HSM_ERROR(8),			///<缓冲区为空或尺寸不够
};
typedef enum THccDrvPerHsmTag THccDrvPerHsm;


typedef Int32 THccDrvPerHsmLine;
#define kHccDrvPerHsmSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccDrvPerHsmFailLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(0)	///<失败
#define kHccDrvPerHsmCommLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(1)	///<通讯错误
#define kHccDrvPerHsmParamLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(2)	///<参数错误
#define kHccDrvPerHsmCallBackLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(3)	///<回调函数未设置
#define kHccDrvPerHsmExistLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(4)	///<芯片不存在
#define kHccDrvPerHsmOpenedLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(5)	///<设备已打开
#define kHccDrvPerHsmClosedLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(6)	///<设备已关闭
#define kHccDrvPerHsmKeyLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(7)	///<密钥导致的失败
#define kHccDrvPerHsmBufferLine	HCC_MAKE_DRV_PER_HSM_ERROR_LINE(8)	///<缓冲区为空或尺寸不够

//旧版本适配补丁
typedef THccDrvPerHsm TPerHsmErrorCode;

#define kPerHsmErrorCodeSuccess kHccDrvPerHsmSuccess
#define kPerHsmErrorCodeFail kHccDrvPerHsmFail
#define kPerHsmErrorCodeComm kHccDrvPerHsmComm
#define kPerHsmErrorCodeParam kHccDrvPerHsmParam
#define kPerHsmErrorCodeCallBack kHccDrvPerHsmCallBack
#define kPerHsmErrorCodeExist kHccDrvPerHsmExist
#define kPerHsmErrorCodeOpened kHccDrvPerHsmOpened
#define kPerHsmErrorCodeClosed kHccDrvPerHsmClosed
#define kPerHsmErrorCodeKey kHccDrvPerHsmKey
#define kPerHsmErrorCodeBuffer kHccDrvPerHsmBuffer

#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_DRV_PER_HSM_H_
/**
 * @
 */
